//
// Created by tang on 2022/10/23.
//

#ifndef LEARNOPENGL_WAVE_APP_HPP
#define LEARNOPENGL_WAVE_APP_HPP

#include "app/base_app.hpp"
#include "gl/gl_utils.hpp"

struct WavePoint {
    GLfloat x, y;
};

class WaveApp final : public App {
public:
    WaveApp(GLFWwindow *window, const char* name);
    ~WaveApp();

    void OnInitialize() override;
    void OnCleanup() override;
protected:
    void RenderFrame(double delta_time, double total_time) override;

private:
    GL::ProgramPtr m_program_;
    GL::VertexArrayPtr m_vao_;

    std::vector<WavePoint> m_points_;
};

#endif// LEARNOPENGL_WAVE_APP_HPP
